function simpleForOf(iterable) {
  const iterator = iterable[Symbol.iterator]()
  // let done = false
  
  while(true) {
    const result = iterator.next() 
    if (result.done) break
    
    console.log(result.value);
    // done = result.done
  }
}

simpleForOf([1, 2, 3, 4, 5])
